import Request from "../../../utils/request.js";

 //let walletHost= 'http://10.73.158.41:8089/app/'
let walletHost= 'app/'
export default class {
  // 首页-钱包用户信息
  static getWalletUser (params = {}) {
    var accountId = wx.getStorageSync('userId');
    return Request({
      url: walletHost+"wallet/center/getWalletUser",
      type: "POST",
      data: {...params,accountId},
    })
  }
  // 首页-‘余额
  static queryAcctinfo (params = {}) {
    return Request({
      url: walletHost+"wallet/center/queryAcctinfo",
      type: "POST",
      data: params,
    })
  }
  
  
  // ----------修改交易密码---开始----------
  // 忘记交易密码-提交
  static findPasswordVerify (params = {}) {
    return Request({
      url: walletHost+"wallet/center/findPasswordVerify",
      type: "POST",
      data: params,
    })
  }
  // 忘记交易密码-发送验证码
  static findPasswordApply (params = {}) {
    return Request({
      url: walletHost+"wallet/center/findPasswordApply",
      type: "POST",
      data: params,
    })
  }
// ----------修改交易密码---结束----------

// ----------提现申请---开始----------
  
  // 查询绑定的银行卡列表
  static queryLinkedAcct (params = {}) {
    return Request({
      url: walletHost+"wallet/center/queryLinkedAcct",
      type: "post",
      data: params,
    })
  }
  
  // 提现申请-发送验证码
  static withdrawal (params = {}) {
    return Request({
      url: walletHost+"wallet/center/withdrawal",
      type: "POST",
      data: params,
    })
  }
  // 提现申请-确认
  static tradeSecondSmsValid (params = {}) {
    return Request({
      url: walletHost+"wallet/center/tradeSecondSmsValid",
      type: "POST",
      data: params,
    })
  }
  
  // 提现申请结果查询
  static queryTnx (params = {}) {
    return Request({
      url: walletHost+"wallet/center/queryWithdrawal",
      type: "POST",
      data: params,
    })
  }
// ----------提现申请---结束----------

  
  
  // ----------交易明细-------------
  // 交易明细列表
  static queryAccountDetail (params = {}) {
    return Request({
      url: walletHost+"wallet/center/queryAccountDetail",
      type: "POST",
      data: params,
    })
  }
  
  // ----------销户-------------
  // 销户申请
  static cancelApply (params = {}) {
    return Request({
      url: walletHost+"wallet/center/cancelApply",
      type: "POST",
      data: params,
    })
  }
  // ----------修改钱包手机号码-------------
  // 手机号修改申请
  static mobileChangeApply (params = {}) {
    return Request({
      url: walletHost+"wallet/center/mobileChangeApply",
      type: "POST",
      data: params,
    })
  }
  // 验证码验证
  static mobileChangeVerify (params = {}) {
    return Request({
      url: walletHost+"wallet/center/mobileChangeVerify",
      type: "POST",
      data: params,
    })
  }
  static redPacketRecord(params ={}){
    return Request({
      url: walletHost+"wallet/redPacket/queryRedPacketRecord",
      type: "POST",
      data: params
    })
    }
   // 获取佣金详情
   static getCommissionDetail(params) {
    return Request({
      // url: "app/commission/commissionDetail",
      url: 'app/commissionToXK/queryCommission',
      type: "POST",
      data: params,
      headers: {
        "Content-type": "application/json"
      },
    })
  }
  
}

